#!/usr/local/bin/python3
# coding=utf-8


def test_capitalize():
    value = "abcdefg".capitalize()
    print(value)

def test_casefoold():
    value = "Abcdefg".casefold()
    print(value)

def test_centered():
    value = "Abcdefg".center(88,"=")
    print(value)

def test_count():
    value = "aaabbbbccccc".count("a")
    print(value)

def test_encode():
    value = "aaabbbbccccc".encode("utf-16")
    print(value)

def test_endswith():
    value = "aaabbbbccccc".endswith("c")
    print(value)

def test_startswith():
    value = "aaabbbbccccc".endswith("c")
    print(value)

def test_find():
    value = "aaabbbbccccc".find("b")
    print(value)

def test_format_map():
    pp = {"name":"fff", "age":999}
    value = "aaabbbbccc{name}cc{age}".format_map(pp)
    print(value)


def test_index():
    value = "aaabbbbccdddeee".index("cc")
    print(value)

def test_isalnum():
    #判断字符串是否只有字母和数字组成
    value = "aaabbbbccdddeeekkk".isalnum()
    print(value)

def test_isalpha():
    #判断字符串是否只有字母组成
    value = "aaacc222".isalpha()
    print(value)

def test_isalpha():
    #判断字符串是否只有字母组成
    value = "aaacc222".isalpha()
    print(value)

def test_isnumeric():
    value = "1234556".isnumeric()
    print(value)

def test_isprintable():
    value = "1234556".isprintable()
    print(value)

def test_isspace():
    value = "     ".isspace()
    print(value)

def test_join():
    seq = ['hello','good','boy','doiido']
    value = "*".join(seq)
    print(value)

def test_ljust():
    value = "1234556".ljust(88,"*")
    print(value)

def test_lstrip():
    value = "    1234556   ".lstrip()
    print(value)

def test_rstrip():
    value = "    1234556   ".rstrip()
    print(value)

def test_strip():
    value = "    1234556   ".strip()
    print(value)

def test_maketrans():
    transtab = str.maketrans({'a':'fffff'})
    news = 'appale'
    print (news.translate(transtab))


def test_maketrans1():
    transtab = str.maketrans("aaa","ddd")
    news = 'apple'
    print (news.translate(transtab))

def test_partition():
    value = "aaa*bbb".partition("*")
    print(value)

def test_removeprefix():
    value = "ppp_ffff_ddd".removeprefix("p")
    print(value)

def test_removesuffix():
    value = "ppp_ffff_ddd".removesuffix("ddd")
    print(value)

def test_replace():
    value = "ppp_ffff_ddd".replace("ddd","fuck")
    print(value)

def test_rfind():
    value = "ppp_ffff_ddd".rfind("f")
    print(value)

def test_rjust():
    value = "ppp_ffff_ddd".rjust(99,"=")
    print(value)

def test_splitlines():
    value = 'ab c\n\nde fg\rkl\r\n'.splitlines()
    print(value)

def test_swapcase():
    #大小写互换
    value = 'abCdEF'.swapcase()
    print(value)

def test_zfill():
    #大小写互换
    value = '+42'.zfill(5)
    print(value)

def test_print():
    print("aaabbbccc%X" % (9999))

if __name__ == "__main__":
    test_print()